import service from '@/utils/requestTopo';

export const getSceneVersionList = id =>
  service({
    url: `/simulation/scene/scene/${id}/version/`,
    method: 'get',
  });

export const createSceneVersion = (id, data) =>
  service({
    url: `/simulation/scene/scene/${id}/version/`,
    method: 'post',
    data,
  });

/**
 * 获取场景版本拓扑
 * @param id
 * @returns {*}
 */
export const getSceneVersionTopo = id =>
    service({
        url: `/simulation/scene/scene/version/${id}/`,
        method: 'get',
    });

export const deleteSceneVersion = id =>
  service({
    url: `/simulation/scene/scene/version/${id}/`,
    method: 'delete',
  });

export const switchSceneVersion = id =>
  service({
    url: `/simulation/scene/scene/version/${id}/switch/`,
    method: 'post',
  });

export const transferSceneVersion = (id, data) =>
  service({
    url: `/simulation/scene/scene/version/${id}/transfer/`,
    method: 'post',
    data
  });
